public class Player{
        protected  String name;
        protected  int pieces;
        protected  int free_pieces;
        protected  int set_pieces;

        protected  Point src_pos;
        protected  Point dst_pos;

        protected  boolean is_human;
        protected  Pieces who;
        public Player(){
                pieces = 18;
                free_pieces = 18;
                set_pieces = 0;
                who = Pieces.NO;
        }
        public Player(String name, Pieces who, int pieces_num, boolean is_human){
                if(who != Pieces.P1 || who != Pieces.P2)
                        this.who = Pieces.NO;

                this.name = name;
                this.who = who;
                pieces = pieces_num;
                free_pieces = pieces_num;
                set_pieces = 0;
                src_pos = new Point();
                dst_pos = new Point();
                System.out.println("Base Player Init ok!");
                this.is_human =  is_human;
        }
        public Pieces getIsHuman(){
                return is_human;
        }
        public Pieces getWho(){
                return who;
        }
        public boolean decFreePieces()
        {
                set_pieces++;
                free_pieces--;
                if(free_pieces == 0)
                        return true;
                return false;
        }
        public boolean decSetPieces(){
                set_pieces--;
                if(set_pieces < 4)
                        return true;
                return false;
        }
        protected boolean getNextStep(Action act, Board board){
                return true;
        }
        protected  boolean setNextStep(Action act, Board board){
                return false;
        }
        protected boolean getNextKill(Point pos, Board board){
                return false;
        }
        protected boolean getNextSet(Point pos, Board board){
                return false;
        }
        protected boolean getNextMove(Point src_pos,Point dst_pos,  Board board){
                return false;
        }
        public String toString(){
                return name;
        }
}
